home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 410 < prev    next >
Encoding:
Text File  |  1996-08-05  |  665 b   |  24 lines

  1. Path: ix.netcom.com!netnews
  2. From: tstevens@ix.netcom.com (Edward Stevens )
  3. Newsgroups: comp.lang.c
  4. Subject: char* string problem
  5. Date: 5 Jan 1996 03:56:14 GMT
  6. Organization: Netcom
  7. Message-ID: <4ci7gu$68r@cloner3.netcom.com>
  8. NNTP-Posting-Host: ix-wh3-16.ix.netcom.com
  9. X-NETCOM-Date: Thu Jan 04  7:56:14 PM PST 1996
  10.  
  11.     I need to prepend some switch characters to some strings passed 
  12. to a main program which I have renamed for use as a function. 
  13.  
  14. The calling program looks like this:
  15.  
  16. char* the_args[4];
  17. char* Aprefix = " -A";
  18. char* Bprefix = " -B";
  19. char* CPrefix = " -C";
  20. char* Dprexix = " -D";
  21.  
  22. the_args[0] = "user_name";
  23. the_args[0] = strcat(Aprefix,the_args[0]);
  24.